package com.heiye.blog.ai.domain.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.heiye.blog.ai.domain.dos.RoleCapabilityLabelDO;

import java.util.List;

/**
 * @author: heiye
 * @date: 2025/11/05 下午7:55
 * @version: v1.0.0
 * @description: TODO
 */
public interface RobotCapabilityLabelMapper extends BaseMapper<RoleCapabilityLabelDO> {

    /**
     * 根据智能体 IDS 查询对应能力标签
     *
     * @param roleIds
     * @return
     */
    default List<RoleCapabilityLabelDO> selectByRobotIds(List<Long> roleIds) {
        return selectList(Wrappers.<RoleCapabilityLabelDO>lambdaQuery()
                .in(RoleCapabilityLabelDO::getRoleId, roleIds));
    }

    /**
     * 根据智能体 ID 查询能力标签
     *
     * @param robotId
     * @return
     */
    default List<RoleCapabilityLabelDO> selectByRobotId(Long robotId) {
        return selectList(Wrappers.<RoleCapabilityLabelDO>lambdaQuery()
                .eq(RoleCapabilityLabelDO::getRoleId, robotId));
    }
}
